home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
076-100
/
disk_098
/
hddriver
/
support
/
park.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-06
|
699b
|
37 lines
/* assumes 32 bit ints */
#include "harddisk.h"
extern struct MsgPort *CreatePort();
extern struct IOStdReq *CreateExtIO();
main ()
{
struct IOExtHD *req;
struct MsgPort *port;
int status;
port = CreatePort ( 0 , 0 );
if ( port != NULL ) {
req = (struct IOExtHD *)
CreateExtIO ( port , sizeof ( struct IOExtHD ) );
if ( req != NULL ) {
if ( OpenDevice ( HD_NAME , 0 , req , 0 ) == 0 ) {
req->iohd_TD.iotd_Req.io_Command = HD_PARK;
if ( DoIO ( req ) == 0 ) {
printf ( "Park complete\n" );
}
else {
printf ( "Park failed\n" );
}
CloseDevice ( req );
}
DeleteExtIO ( req , sizeof ( struct IOExtHD ) );
}
DeletePort ( port );
}
}